package com.ai.common.constant;



import com.ai.entity.made.camera.TelegramCamera;
import com.ai.networking.websocket.service.WebSocket;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;

/**
 * @Author: Mr.Gao
 * @Description:
 * @Date: 2019-11-07/15:20
 */

public abstract class CommonArgs {

    //记录开启算法的时间
    public static Long START_ALGORITHM_TIME = 0L;
    //算法的现状，true启动，false未启动
    public static boolean IS_ALGORITHM_STATUS = true;
    public static boolean IS_CAMERA_STATUS = true;

    public static boolean IS_CAMERA = true;
    public static boolean IS_ALGORITHM = true;

    //记录开启摄像头的时间
    public static Long START_CAMERA_TIME = 0L;
    //记录摄像头开启的时间或收到直播的时间
    public static ConcurrentHashMap<Integer, Long> CAMERA_HEARTBEAT_MAP = new ConcurrentHashMap<>();

    public static String TOMCAT_PATH = "/home/inspur/system/static_resources";

    //未发送消息的websocket
    public static CopyOnWriteArraySet<WebSocket> WS_SOCKET_SET = new CopyOnWriteArraySet<>();
    //将看直播的对象在这里分类
    public static ConcurrentHashMap<Integer, CopyOnWriteArraySet<WebSocket>> WS_LIVE_MAP = new ConcurrentHashMap<>();
    //摄像头管理页面
    public static ConcurrentHashMap<Integer, CopyOnWriteArraySet<WebSocket>> WS_CAMERA_MAP = new ConcurrentHashMap<>();
    //服务器管理页面
    public static ConcurrentHashMap<Integer, CopyOnWriteArraySet<WebSocket>> WS_SERVER_MAP = new ConcurrentHashMap<>();
    //人员点数分析
    public static ConcurrentHashMap<Integer, CopyOnWriteArraySet<WebSocket>> WS_POINT_MAP = new ConcurrentHashMap<>();
    //人员流动分析
    public static ConcurrentHashMap<Integer, CopyOnWriteArraySet<WebSocket>> WS_FLOW_MAP = new ConcurrentHashMap<>();
    //用户管理页面
    public static ConcurrentHashMap<Integer, CopyOnWriteArraySet<WebSocket>> WS_USER_MAP = new ConcurrentHashMap<>();
    //识别功能界面
    public static ConcurrentHashMap<Integer, CopyOnWriteArraySet<WebSocket>> WS_RECORD_MAP = new ConcurrentHashMap<>();
    //首页
    public static CopyOnWriteArraySet<WebSocket> WS_INDEX_SET = new CopyOnWriteArraySet<>();

    //发送socket
    public static ConcurrentHashMap<Integer, Long> SOCKET_PING_MAP = new ConcurrentHashMap<>();

    //信号-摄像头开关映射集合
    public static CopyOnWriteArrayList<TelegramCamera> TELEGRAM_CAMERAS_LIST_2250 = new CopyOnWriteArrayList<>();
    public static CopyOnWriteArrayList<TelegramCamera> TELEGRAM_CAMERAS_LIST_1780 = new CopyOnWriteArrayList<>();

    //用来判断是否跳过处理的临时电文数组集合
    public static byte[] TELEGRAM_BYTES_DATA_2250 = new byte[166];
    public static byte[] TELEGRAM_BYTES_DATA_1780 = new byte[166];
}

